export default [
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/login',
        component: () => import('./login.vue'),
        meta: { title: '登录' },
    },
    {
        path: '/',
        component: () => import('@/components/layout/Home.vue'),
        meta: { title: '自述文件' },
        children:[
            {
                path: '/home',
                component: () => import('./home.vue'),
                meta: { title: '首页' }
            }
        ]
    },
    {
        path: '/',
        component: () => import('@/components/layout/Home.vue'),
        meta: { title: '自述文件' },
        children:[
            {
                path: '/selfPosts',
                component: () => import('./selfPosts.vue'),
                meta: { title: '我的文章' }
            }
        ]
    },
    {
        path: '/',
        component: () => import('@/components/layout/Home.vue'),
        meta: { title: '自述文件' },
        children:[
            {
                path: '/createPost',
                component: () => import('./createPost.vue'),
                meta: { title: '发表文章' }
            }
        ]
    },
    {
        path: '/',
        meta: {
            title: '自述文件'
        },
        component: resolve => require(['@/components/layout/Home.vue'], resolve),
        children: [{
            path: '/post_detail/:id',
            name: 'post_detail',
            component:() => import('./post_detail.vue'),
            meta: {
                title: '文章详情'
            }
        }]
    },
    {
        path: '/',
        meta: {
            title: '自述文件'
        },
        component: resolve => require(['@/components/layout/Home.vue'], resolve),
        children: [{
            path: '/editor/:id',
            name: 'editor',
            component:() => import('./editor.vue'),
            meta: {
                title: '编辑文章'
            }
        }]
    },
    {
        path: '/redirect',
        component: () => import('./redirect.vue'),
        meta: { title: '第三方授权' },
    },
]